home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
wtj009.zip
/
VBMEM.ZIP
/
MEMHUGE.FRM
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1992-06-21
|
5KB
|
112 lines
MemHugeForm
Huge Arrays - Made in VB
System
Form1
Mnu_Demo
&Demo
Mnu_LongInteger
&Long Integer - hmemcpy
Mnu_UserType
&User Type - ToolHelp
Mnu_TimeTest
&Time Test
AHINCR
@ Form_Load
GetProcAddress
GetModuleHandle
Mnu_LongInteger_Click
MemHandle
wSize
lpAddress
dwData
dwIndex
dwBytes
GlobalAlloc
GHNDA
GlobalLock_
hmemcpyu
GlobalUnlocka
GlobalFree
Mnu_UserType_Click
StoreRec
VideoType
RecordsSize
GlobalHandleToSel
Index
Title
Length
IsRented
Customer
CustomerNo
dwOffset
dwcb.
Bytes
MemoryWrite
MemoryRead
Mnu_TimeTest_Click
StartTime
GetTickCount
EndTimeR
THE VB MEMORY LANE by Costas Kitsos
Form_Load
KERNEL
__AHINCR
Mnu_LongInteger_Click
Demo a 70,000 element Array of Long Integers
wSize equals the size of a long Integer (4 bytes)
If our request failed then exit
Allocated"t
bytesu
get a pointer to the memory block
Writing Data to"
Element Array of Long Integers"
calculate the Selector portion of the Address
write some data
Reading Data from element:s
Data in Element"t
= "s
Freeing Memoryu
Doneu
Mnu_UserType_Click
Demo a User Defined Type array of 2,000 elements
256,000 bytes
If our request failed then exit
Allocated t
bytesu
get a selector
some data to writea
Silence of the Lambs
Gus Tomer"
Wrote:t
bytes at Index 1999u
Ready to read it back now.
erase the record to prove that it worked.
StoreRec.IsRented = 0
read the record
Read:"t
bytes at index 1999u
StoreRec.Index = "t
StoreRec.Title = "t
StoreRec.Length = t
StoreRec.IsRented = t
StoreRec.Customer = t
StoreRec.CustomerNo = t
Doneu
Mnu_TimeTest_Click
Demo a 100,000 element Array of Long Integers
wSize equals the size of a long integer (4 bytes)
If our request failed then exit
Allocated"t
bytesu
get a pointer to the memory block
Writing Data with hmemcpy to
Element Array of Long Integers"
calculate the Selector portion of the Address
hmemcpy Time = "t
milliseconds"u
Writing Data with ToolHelp to"
Element Array of Long Integers"
ToolHelp Time = t
milliseconds"u
Doneu